#ifndef PLUGINMANAGER_H
#define PLUGINMANAGER_H

#include <QObject>
#include <QStringList>
#include <QThread>
#include "IPlugin.h"

class PluginManager : public QObject
{
   Q_OBJECT

public:
   explicit PluginManager(QStringList pluginPaths,
                          QObject *parent = 0);

   void startPlugins();
   void stopPlugins();

signals:
   void signalRegisterPlugin(Plugin *plugin);
   void signalStartService();
   void signalStopService();

protected:
   void loadPlugin(QString path);
   void unloadPlugin(QString path);

   QStringList thePluginPaths;
   QMap<Plugin*, QThread*> thePlugins;
};

#endif // PLUGINMANAGER_H
